python one line for loop if else